cmake_minimum_required(VERSION 3.19)
project(home_pcb C)

set(CMAKE_C_STANDARD 11)

include_directories(app/include)
include_directories(include)
include_directories(include/json)
include_directories(third_party/include)
include_directories(third_party/include/arch)
include_directories(third_party/include/lwip)
include_directories(third_party/include/lwip/app)
include_directories(third_party/include/mbedtls)
include_directories(third_party/include/mbedtls/sys)
include_directories(third_party/include/netif)
include_directories(third_party/include/ssl)
include_directories(third_party/include/ssl/app)

add_executable(home_pcb
        app/driver/include/debug.h
        app/driver/include/typedef.h
        app/driver/include/uart.h
        app/driver/include/uart_register.h
        app/include/user_config.h
        app/mqtt/config.c
        app/mqtt/mqtt.c
        app/mqtt/mqtt_msg.c
        app/mqtt/proto.c
        app/mqtt/queue.c
        app/mqtt/ringbuf.c
        app/mqtt/utils.c
        app/driver/uart.c
        app/user/user_main.c
        include/json/json.h
        include/json/jsonparse.h
        include/json/jsontree.h
        include/airkiss.h
        include/at_custom.h
        include/c_types.h
        include/eagle_soc.h
        include/espconn.h
        include/espnow.h
        include/ets_sys.h
        include/gpio.h
        include/ip_addr.h
        include/mem.h
        include/os_type.h
        include/osapi.h
        include/ping.h
        include/pwm.h
        include/queue.h
        include/simple_pair.h
        include/smartconfig.h
        include/sntp.h
        include/spi_flash.h
        include/upgrade.h
        include/user_interface.h
        include/version.h
        include/wpa2_enterprise.h
        third_party/include/arch/cc.h
        third_party/include/arch/perf.h
        third_party/include/arch/sys_arch.h
        third_party/include/lwip/app/dhcpserver.h
        third_party/include/lwip/app/espconn.h
        third_party/include/lwip/app/espconn_buf.h
        third_party/include/lwip/app/espconn_tcp.h
        third_party/include/lwip/app/espconn_udp.h
        third_party/include/lwip/app/ping.h
        third_party/include/lwip/app/time.h
        third_party/include/lwip/api.h
        third_party/include/lwip/api_msg.h
        third_party/include/lwip/arch.h
        third_party/include/lwip/autoip.h
        third_party/include/lwip/debug.h
        third_party/include/lwip/def.h
        third_party/include/lwip/dhcp.h
        third_party/include/lwip/dns.h
        third_party/include/lwip/err.h
        third_party/include/lwip/icmp.h
        third_party/include/lwip/igmp.h
        third_party/include/lwip/inet.h
        third_party/include/lwip/inet_chksum.h
        third_party/include/lwip/init.h
        third_party/include/lwip/ip.h
        third_party/include/lwip/ip_addr.h
        third_party/include/lwip/ip_frag.h
        third_party/include/lwip/mdns.h
        third_party/include/lwip/mem.h
        third_party/include/lwip/memp.h
        third_party/include/lwip/memp_std.h
        third_party/include/lwip/netbuf.h
        third_party/include/lwip/netdb.h
        third_party/include/lwip/netif.h
        third_party/include/lwip/netifapi.h
        third_party/include/lwip/opt.h
        third_party/include/lwip/pbuf.h
        third_party/include/lwip/puck_def.h
        third_party/include/lwip/raw.h
        third_party/include/lwip/sio.h
        third_party/include/lwip/snmp.h
        third_party/include/lwip/snmp_asn1.h
        third_party/include/lwip/snmp_msg.h
        third_party/include/lwip/snmp_structs.h
        third_party/include/lwip/sntp.h
        third_party/include/lwip/sockets.h
        third_party/include/lwip/stats.h
        third_party/include/lwip/sys.h
        third_party/include/lwip/tcp.h
        third_party/include/lwip/tcp_impl.h
        third_party/include/lwip/tcpip.h
        third_party/include/lwip/timers.h
        third_party/include/lwip/udp.h
        third_party/include/mbedtls/sys/espconn_mbedtls.h
        third_party/include/mbedtls/sys/socket.h
        third_party/include/mbedtls/aes.h
        third_party/include/mbedtls/aesni.h
        third_party/include/mbedtls/arc4.h
        third_party/include/mbedtls/asn1.h
        third_party/include/mbedtls/asn1write.h
        third_party/include/mbedtls/base64.h
        third_party/include/mbedtls/bignum.h
        third_party/include/mbedtls/blowfish.h
        third_party/include/mbedtls/bn_mul.h
        third_party/include/mbedtls/camellia.h
        third_party/include/mbedtls/ccm.h
        third_party/include/mbedtls/certs.h
        third_party/include/mbedtls/check_config.h
        third_party/include/mbedtls/cipher.h
        third_party/include/mbedtls/cipher_internal.h
        third_party/include/mbedtls/compat-1.3.h
        third_party/include/mbedtls/config.h
        third_party/include/mbedtls/config_esp.h
        third_party/include/mbedtls/ctr_drbg.h
        third_party/include/mbedtls/debug.h
        third_party/include/mbedtls/des.h
        third_party/include/mbedtls/dhm.h
        third_party/include/mbedtls/ecdh.h
        third_party/include/mbedtls/ecdsa.h
        third_party/include/mbedtls/ecjpake.h
        third_party/include/mbedtls/ecp.h
        third_party/include/mbedtls/entropy.h
        third_party/include/mbedtls/entropy_poll.h
        third_party/include/mbedtls/error.h
        third_party/include/mbedtls/gcm.h
        third_party/include/mbedtls/havege.h
        third_party/include/mbedtls/hmac_drbg.h
        third_party/include/mbedtls/mbedtls_debug.h
        third_party/include/mbedtls/md.h
        third_party/include/mbedtls/md2.h
        third_party/include/mbedtls/md4.h
        third_party/include/mbedtls/md5.h
        third_party/include/mbedtls/md_internal.h
        third_party/include/mbedtls/memory_buffer_alloc.h
        third_party/include/mbedtls/net.h
        third_party/include/mbedtls/oid.h
        third_party/include/mbedtls/padlock.h
        third_party/include/mbedtls/pem.h
        third_party/include/mbedtls/pk.h
        third_party/include/mbedtls/pk_internal.h
        third_party/include/mbedtls/pkcs11.h
        third_party/include/mbedtls/pkcs12.h
        third_party/include/mbedtls/pkcs5.h
        third_party/include/mbedtls/platform.h
        third_party/include/mbedtls/ripemd160.h
        third_party/include/mbedtls/rsa.h
        third_party/include/mbedtls/sha1.h
        third_party/include/mbedtls/sha256.h
        third_party/include/mbedtls/sha512.h
        third_party/include/mbedtls/ssl.h
        third_party/include/mbedtls/ssl_cache.h
        third_party/include/mbedtls/ssl_ciphersuites.h
        third_party/include/mbedtls/ssl_cookie.h
        third_party/include/mbedtls/ssl_internal.h
        third_party/include/mbedtls/ssl_ticket.h
        third_party/include/mbedtls/threading.h
        third_party/include/mbedtls/timing.h
        third_party/include/mbedtls/version.h
        third_party/include/mbedtls/x509.h
        third_party/include/mbedtls/x509_crl.h
        third_party/include/mbedtls/x509_crt.h
        third_party/include/mbedtls/x509_csr.h
        third_party/include/mbedtls/xtea.h
        third_party/include/netif/etharp.h
        third_party/include/netif/if_llc.h
        third_party/include/netif/ppp_oe.h
        third_party/include/netif/wlan_lwip_if.h
        third_party/include/ssl/app/espconn_secure.h
        third_party/include/ssl/app/espconn_ssl.h
        third_party/include/ssl/ssl_bigint.h
        third_party/include/ssl/ssl_bigint_impl.h
        third_party/include/ssl/ssl_cert.h
        third_party/include/ssl/ssl_config.h
        third_party/include/ssl/ssl_crypto.h
        third_party/include/ssl/ssl_crypto_misc.h
        third_party/include/ssl/ssl_os_int.h
        third_party/include/ssl/ssl_os_port.h
        third_party/include/ssl/ssl_private_key.h
        third_party/include/ssl/ssl_ssl.h
        third_party/include/ssl/ssl_tls1.h
        third_party/include/ssl/ssl_version.h
        third_party/include/lwipopts.h
        third_party/include/user_config.h
        third_party/lwip/api/api_lib.c
        third_party/lwip/api/api_msg.c
        third_party/lwip/api/err.c
        third_party/lwip/api/netbuf.c
        third_party/lwip/api/netdb.c
        third_party/lwip/api/netifapi.c
        third_party/lwip/api/sockets.c
        third_party/lwip/api/tcpip.c
        third_party/lwip/app/dhcpserver.c
        third_party/lwip/app/espconn.c
        third_party/lwip/app/espconn_buf.c
        third_party/lwip/app/espconn_mdns.c
        third_party/lwip/app/espconn_tcp.c
        third_party/lwip/app/espconn_udp.c
        third_party/lwip/app/netio.c
        third_party/lwip/app/ping.c
        third_party/lwip/core/ipv4/autoip.c
        third_party/lwip/core/ipv4/icmp.c
        third_party/lwip/core/ipv4/igmp.c
        third_party/lwip/core/ipv4/inet.c
        third_party/lwip/core/ipv4/inet_chksum.c
        third_party/lwip/core/ipv4/ip.c
        third_party/lwip/core/ipv4/ip_addr.c
        third_party/lwip/core/ipv4/ip_frag.c
        third_party/lwip/core/def.c
        third_party/lwip/core/dhcp.c
        third_party/lwip/core/dns.c
        third_party/lwip/core/init.c
        third_party/lwip/core/mdns.c
        third_party/lwip/core/mem.c
        third_party/lwip/core/memp.c
        third_party/lwip/core/netif.c
        third_party/lwip/core/pbuf.c
        third_party/lwip/core/raw.c
        third_party/lwip/core/sntp.c
        third_party/lwip/core/stats.c
        third_party/lwip/core/sys.c
        third_party/lwip/core/sys_arch.c
        third_party/lwip/core/tcp.c
        third_party/lwip/core/tcp_in.c
        third_party/lwip/core/tcp_out.c
        third_party/lwip/core/timers.c
        third_party/lwip/core/udp.c
        third_party/lwip/netif/etharp.c
        third_party/mbedtls/app/espconn_mbedtls.c
        third_party/mbedtls/app/espconn_secure.c
        third_party/mbedtls/app/lwIPFile.c
        third_party/mbedtls/app/lwIPSocket.c
        third_party/mbedtls/library/aes.c
        third_party/mbedtls/library/aesni.c
        third_party/mbedtls/library/arc4.c
        third_party/mbedtls/library/asn1parse.c
        third_party/mbedtls/library/asn1write.c
        third_party/mbedtls/library/base64.c
        third_party/mbedtls/library/bignum.c
        third_party/mbedtls/library/blowfish.c
        third_party/mbedtls/library/camellia.c
        third_party/mbedtls/library/ccm.c
        third_party/mbedtls/library/certs.c
        third_party/mbedtls/library/cipher.c
        third_party/mbedtls/library/cipher_wrap.c
        third_party/mbedtls/library/ctr_drbg.c
        third_party/mbedtls/library/debug.c
        third_party/mbedtls/library/des.c
        third_party/mbedtls/library/dhm.c
        third_party/mbedtls/library/ecdh.c
        third_party/mbedtls/library/ecdsa.c
        third_party/mbedtls/library/ecjpake.c
        third_party/mbedtls/library/ecp.c
        third_party/mbedtls/library/ecp_curves.c
        third_party/mbedtls/library/entropy.c
        third_party/mbedtls/library/entropy_poll.c
        third_party/mbedtls/library/error.c
        third_party/mbedtls/library/gcm.c
        third_party/mbedtls/library/havege.c
        third_party/mbedtls/library/hmac_drbg.c
        third_party/mbedtls/library/md.c
        third_party/mbedtls/library/md2.c
        third_party/mbedtls/library/md4.c
        third_party/mbedtls/library/md5.c
        third_party/mbedtls/library/md_wrap.c
        third_party/mbedtls/library/memory_buffer_alloc.c
        third_party/mbedtls/library/net.c
        third_party/mbedtls/library/oid.c
        third_party/mbedtls/library/padlock.c
        third_party/mbedtls/library/pem.c
        third_party/mbedtls/library/pk.c
        third_party/mbedtls/library/pk_wrap.c
        third_party/mbedtls/library/pkcs11.c
        third_party/mbedtls/library/pkcs12.c
        third_party/mbedtls/library/pkcs5.c
        third_party/mbedtls/library/pkparse.c
        third_party/mbedtls/library/pkwrite.c
        third_party/mbedtls/library/platform.c
        third_party/mbedtls/library/ripemd160.c
        third_party/mbedtls/library/rsa.c
        third_party/mbedtls/library/sha1.c
        third_party/mbedtls/library/sha256.c
        third_party/mbedtls/library/sha512.c
        third_party/mbedtls/library/ssl_cache.c
        third_party/mbedtls/library/ssl_ciphersuites.c
        third_party/mbedtls/library/ssl_cli.c
        third_party/mbedtls/library/ssl_cookie.c
        third_party/mbedtls/library/ssl_srv.c
        third_party/mbedtls/library/ssl_ticket.c
        third_party/mbedtls/library/ssl_tls.c
        third_party/mbedtls/library/threading.c
        third_party/mbedtls/library/timing.c
        third_party/mbedtls/library/version.c
        third_party/mbedtls/library/version_features.c
        third_party/mbedtls/library/x509.c
        third_party/mbedtls/library/x509_create.c
        third_party/mbedtls/library/x509_crl.c
        third_party/mbedtls/library/x509_crt.c
        third_party/mbedtls/library/x509_csr.c
        third_party/mbedtls/library/x509write_crt.c
        third_party/mbedtls/library/x509write_csr.c
        third_party/mbedtls/library/xtea.c
        third_party/mbedtls/platform/esp_hardware.c
        third_party/mbedtls/platform/net.c)
